package 继承.考察继承;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 姚东名
 * Date: 2024-06-18
 * Time: 11:12
 */
/*
以下程序的输出结果为
 */
class Base {
    public Base(String s) {
        System.out.print("B");
    }
}
public class Derived extends Base {
    public Derived(String s) {
        super(s);
        System.out.print("D");
    }
    public static void main(String[] args) {
        new Derived("C");
    }
}

/*
执行结果：
BD
 */

/*
【作业内容】
A.BD
B.DB
C.C
D.编译错误
 */